package com.freshmarket.freshmarket.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.freshmarket.freshmarket.dao.StorefrontMapper;
import com.freshmarket.freshmarket.entity.Storefront;
import com.freshmarket.freshmarket.service.IStorefrontService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author Squirrel
 * @since 2020-09-04
 */
@Service
public class StorefrontServiceImpl extends ServiceImpl<StorefrontMapper, Storefront> implements IStorefrontService {

    final StorefrontMapper storefrontMapper;

    public StorefrontServiceImpl(StorefrontMapper storefrontMapper) {
        this.storefrontMapper = storefrontMapper;
    }

    @Override
    public Storefront selectAddress(String storefrontName) {
        Storefront storefront_name = storefrontMapper.selectOne(new QueryWrapper<Storefront>().eq("storefront_name", storefrontName));
        return storefront_name;
    }
}
